package com.ccom.auth;

import com.ccom.starter.cloud.annotation.CcomCloudApplication;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.client.RestTemplate;

/**
 * 用户服务
 */
@EnableDiscoveryClient
@CcomCloudApplication
@ComponentScan({"com.ccom.api", "com.ccom.auth"})
public class CcomAuthServiceApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(CcomAuthServiceApplication.class);
        System.out.println("==========权限服务启动完成===========");
    }

    @Bean(name = "restTemplate")
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}